### Question:
ChargingStation { public boolean communicationAllowed() { return isAccepted() && isConfigured(); } private  ChargingStation();  ChargingStation(String id); Availability getAvailability(); void setAvailability(Availability availability); boolean isReservable(); void setReservable(boolean reservable); boolean isConfigured(); void setConfigured(boolean configured); String getProtocol(); void setProtocol(String protocol); boolean isAccepted(); void setAccepted(boolean accepted); String getId(); Double getLatitude(); void setLatitude(Double latitude); Double getLongitude(); void setLongitude(Double longitude); String getAddressLine1(); void setAddressLine1(String addressLine1); String getAddressLine2(); void setAddressLine2(String addressLine2); String getPostalCode(); void setPostalCode(String postalCode); String getCity(); void setCity(String city); String getRegion(); void setRegion(String region); String getCountry(); void setCountry(String country); Accessibility getAccessibility(); void setAccessibility(Accessibility accessibility); Set<OpeningTime> getOpeningTimes(); void setOpeningTimes(Set<OpeningTime> openingTimes); Set<Evse> getEvses(); void setEvses(Set<Evse> evses); ComponentStatus getStatus(); void setStatus(ComponentStatus status); Map<String, String> getAttributes(); void setAttributes(Map<String, String> attributes); void setConfItems(Map<String, String> configurationItems); Map<String, String> getConfItems(); int getLocalAuthorizationListVersion(); void setLocalAuthorizationListVersion(int localAuthorizationListVersion); void setLocalAuths(Set<LocalAuthorization> localAuthorizations); Set<LocalAuthorization> getLocalAuths(); boolean communicationAllowed();  }### Answer:
@Test public void communicationAllowed() { ChargingStation cs = new ChargingStation(""); cs.setAccepted(true); cs.setConfigured(true); assertTrue(cs.communicationAllowed()); }