@Test
public void testGetView() {
int expectedSize = Strength.values().length;
Strength expectedStrength = Strength.reverse(Strength.FOUR);
WiFiChannel wiFiChannel = new WiFiChannel(1, 2);
fixture.add(wiFiChannel);
when(channelRating.getCount(wiFiChannel)).thenReturn(5);
when(channelRating.getStrength(wiFiChannel)).thenReturn(Strength.FOUR);
ViewGroup viewGroup = mainActivity.findViewById(android.R.id.content);
View actual = fixture.getView(0, null, viewGroup);
assertNotNull(actual);
assertEquals("1", actual.<TextView>findViewById(R.id.channelNumber).getText());
assertEquals("5", actual.<TextView>findViewById(R.id.accessPointCount).getText());
RatingBar ratingBar = actual.findViewById(R.id.channelRating);
assertEquals(expectedSize, ratingBar.getMax());
assertEquals(expectedSize, ratingBar.getNumStars());
assertEquals(expectedStrength.ordinal() + 1, (int) ratingBar.getRating());
assertEquals("", bestChannels.getText());
verify(channelRating).getCount(wiFiChannel);
verify(channelRating).getStrength(wiFiChannel);
}